package ${packageName}.api.${moduleName}.service.impl;

import java.util.Date;
import java.util.UUID;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ${packageName}.api.${moduleName}.dao.${moduleNameU}Dao;
import ${packageName}.api.${moduleName}.service.${moduleNameU}Service;
import com.fosun.spr.core.base.CoBaseService;
import com.fosun.spr.core.utils.ExtAsserts;
<#list servcieModelList as service>  
import ${packageName}.api.${moduleName}.service.model.${service.methodNameU}SpModel;
import ${packageName}.api.${moduleName}.service.model.${service.methodNameU}SrModel;
</#list>

@Transactional(rollbackFor = { RuntimeException.class, Exception.class })
@Service("${moduleName}Service")
public class ${moduleNameU}ServiceImpl extends CoBaseService implements ${moduleNameU}Service {
	@Autowired
	private ${moduleNameU}Dao ${moduleName}Dao;
	//@Resource
	//private ${moduleNameU}Mapper ${moduleName}Mapper;
 
	<#list servcieModelList as service> 
	@Override
	public ${service.methodNameU}SrModel ${service.methodName}(${service.methodNameU}SpModel spModel) {
		${service.methodNameU}SrModel srModel = new ${service.methodNameU}SrModel();
		<#if service.methodType == "LIST">
		srModel.setDatas(${moduleName}Dao.${service.methodName}(spModel));
		srModel.setTotalCount(${moduleName}Dao.${service.methodName}Count(spModel));
		</#if>
		return srModel;
	}	
	</#list>
	
}
